<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>博艺网-登录</title>
    <link rel="shortcut icon" type="image/x-icon" href="http://img.boyitongcheng.com/favicon.ico" media="screen" />
    <link href="/common/css/common.css" rel="stylesheet" type="text/css"/>
    <link href="/common/css/index.css" rel="stylesheet" type="text/css"/>
    <link href="/common/css/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="/common/css/login.css" rel="stylesheet" type="text/css"/>

    <link rel="stylesheet" href="/common/js/jquery-plugin/validate/style.css" type="text/css">
    <script type="text/javascript" src="/common/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/common/js/jquery-plugin/validate/jquery.validate.min.js"></script>

    <script type="text/javascript">
//        if (window.top.location.href != window.location.href) {
//            window.top.location.replace(window.location.href);
//        }

        function reCaptcha() {
            var rdm = Math.random();
            $("#changeCheckCode").attr("src", "/checkCode.json?rdm=" + rdm);
        }

//        $(function () {
//            $("#form").validate({
//                rules: {
//                    username: {
//                        required: true
//                    },
//                    password: {
//                        required: true
//                    },
//                    checkCode: {
//                        rangelength: [4, 4],
//                        required: true,
//                        remote: {
//                            url: "/checkCodeVerify.json",
//                            type: "get",
//                            data: {
//                                checkCode: function () {
//                                    return encodeURI($("#checkCode").val().trim());
//                                }
//                            }
//                        }
//                    }
//                },
//                messages: {
//                    username: {
//                        required: "请输入用户名"
//                    },
//                    password: {
//                        required: "请输入密码"
//                    },
//                    checkCode: {
//                        rangelength: "",
//                        required: "",
//                        remote: "验证码错误"
//                    }
//                },
//                errorPlacement: function (error, element) { //指定错误信息位置
////                    error.insertAfter(element);
////                    $(element).closest("div").addClass("has-error");
//                },
//                highlight: function (element) {
//                    $(element).closest("div").removeClass("has-success");
//                    $(element).closest("div").addClass("has-error");
//                },
//                unhighlight: function (element, errorClass) { // element通过验证时触发
//                    $(element).closest("div").removeClass("has-error");
//                    $(element).closest("div").addClass("has-success");
//                },
//                submitHandler: function (form) {
//                    form.submit();
//                }
//            });
//        });
    </script>
</head>

<body onload="toastFunction();">

<#include "header.ftl"/>

<div class="login">
    <div class="img_left">&nbsp;</div>
    <div class="login-form">
        <h2>账户登录</h2>
        <form id="form" method="post" action="/login">
            <input type="hidden" name="FORMHASH" value='4d409f33d559e1c9'/>
            <input type="text" id="username" name="username" placeholder="请输入手机号"/><br/>
            <input type="password" id="password" name="password" placeholder="请输入密码"/><br/>
            <div>
                <input type="text" style="width: 200px;float: left" id="checkCode" name="checkCode" maxlength="4" placeholder="请输入验证码">
                <img src="/checkCode" style="width: 80px;float: right;margin-top: 20px" id="changeCheckCode" onclick="reCaptcha()" height="35" size="10"/>
            </div><br/>
            <button type="submit">登录</button>

        </form>
        <a href="/forgetPwd" class="wj-pwd">忘记密码？</a>
        <a href="/register" class="ks-regist">快速注册</a>
        <div class="clear"></div>
        <div class="cooperation">
            <p>合作账号</p>

            <a href="https://open.weixin.qq.com/connect/qrconnect?appid=wx2d65111563f0c621&redirect_uri=http%3a%2f%2fwww.boyi028.com%2fwxlogin&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect"><img src="/common/icon/weixin.png"/> <span>微信登录</span></a>
        </div>

    </div>

</div>

<#include "footer.ftl"/>

</body>
</html>